﻿using FreeSql.DataAnnotations;

namespace chatGUI.DataBase.Entity;

[Table(Name = "information")]
public class Information{
    [Column(IsPrimary=true,IsIdentity = true)]
    public int Mno{ get; set; }
    
    [Column(Name = "owner")]
    public string Owner{ get; set; }
    
    [Column(Name = "sender")]
    public string Sender{ get; set; }
    [Column(Name = "receiver")]
    public string Receiver{ get; set; }
    [Column(Name = "mdate")]
    public string MDate{ get; set; }
    [Column(Name = "message")]
    public string Message{ get; set; }
    [Column(Name = "data_type")]
    public string DataType { get; set; }

    public override string ToString(){
        return $"{nameof(Mno)}: {Mno}, {nameof(Owner)}: {Owner}, {nameof(Sender)}: {Sender}, {nameof(Receiver)}: {Receiver}, {nameof(MDate)}: {MDate}, {nameof(Message)}: {Message}";
    }
}